package com.atguigu.jxc.controller;

import com.atguigu.jxc.service.UnitService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @description: 商品单位
 * @author: 化一帆
 * @date: 2023/2/10 17:59
 * @version: v1.0
 */
@RestController
@RequestMapping("/unit")
public class UnitController {

    @Autowired
    private UnitService unitService;
    /**
     * @description: 查询所有的商品单位
     * @author 化一帆
     * @date 2023/2/10 18:00
     */
    @PostMapping("/list")
    public Map<String,Object> list(){
        return unitService.list();
    }

}
